using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._NetworkDiagramTools._Configuration
{
    /// <summary>
    /// <para>Add Reshape Diagram Edges Layout</para>
    /// <para>Adds the Reshape Diagram Edges Layout algorithm to the list of layouts to be automatically chained at the end of the building of diagrams based on a given template. This tool also presets the Reshape Diagram Edges Layout algorithm parameters for any diagram based on that template.</para>
    /// <para>将“重塑逻辑示意图边布局”算法添加到布局列表中，以便在基于给定模板构建逻辑示意图结束时自动链接。此工具还为基于该模板的任何逻辑示意图预设了“调整逻辑示意图边布局”算法参数。</para>
    /// </summary>    
    [DisplayName("Add Reshape Diagram Edges Layout")]
    public class AddReshapeDiagramEdgesLayout : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddReshapeDiagramEdgesLayout()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_utility_network">
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// </param>
        /// <param name="_template_name">
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// </param>
        /// <param name="_is_active">
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the layout algorithm will automatically execute when generating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added layout algorithm will automatically run during the generation of any diagram that is based on the Input Diagram Template parameter. This is the default.
        ///       <para>The parameter values specified for the layout algorithm are used to run the layout during diagram generation. They are also loaded by default when the algorithm is to be run on any diagram based on the input template.    </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>Unchecked—All the parameter values currently specified for the added layout algorithm will be loaded by default when the algorithm is to be run on any diagram based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成逻辑示意图时是否自动执行布局算法。
        ///   <bulletList>
        /// <bullet_item>选中 - 添加的布局算法将在生成基于输入逻辑示意图模板参数的任何逻辑示意图期间自动运行。这是默认设置。
        ///       <para>为布局算法指定的参数值用于在逻辑示意图生成期间运行布局。默认情况下，当算法要在基于输入模板的任何逻辑示意图上运行时，也会加载它们。   </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>未选中—默认情况下，当要在基于输入模板的任何逻辑示意图上运行该算法时，将加载当前为添加的布局算法指定的所有参数值。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// </param>
        public AddReshapeDiagramEdgesLayout(object _in_utility_network, object _template_name, _is_active_value _is_active)
        {
            this._in_utility_network = _in_utility_network;
            this._template_name = _template_name;
            this._is_active = _is_active;
        }
        public override string ToolboxName => "Network Diagram Tools";

        public override string ToolName => "Add Reshape Diagram Edges Layout";

        public override string CallName => "nd.AddReshapeDiagramEdgesLayout";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_in_utility_network, _template_name, _is_active.GetGPValue(), _are_containers_preserved.GetGPValue(), _reshape_type.GetGPValue(), _is_path_preserved.GetGPValue(), _offset_between_segment_absolute, _breakpoint_absolute, _shift_between_edge_absolute, _angle_threshold, _out_utility_network, _out_template_name, _circular_arc_radius, _circular_arc_position.GetGPValue()];

        /// <summary>
        /// <para>Input Network</para>
        /// <para>The utility network or trace network containing the diagram template to modify.</para>
        /// <para>包含要修改的逻辑示意图模板的公共设施网络或追踪网络。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Network")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_utility_network { get; set; }


        /// <summary>
        /// <para>Input Diagram Template</para>
        /// <para>The name of the diagram template to modify.</para>
        /// <para>要修改的逻辑示意图模板的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _template_name { get; set; }


        /// <summary>
        /// <para>Active</para>
        /// <para><xdoc>
        ///   <para>Specifies whether the layout algorithm will automatically execute when generating diagrams based on the specified template.
        ///   <bulletList>
        ///     <bullet_item>Checked—The added layout algorithm will automatically run during the generation of any diagram that is based on the Input Diagram Template parameter. This is the default.
        ///       <para>The parameter values specified for the layout algorithm are used to run the layout during diagram generation. They are also loaded by default when the algorithm is to be run on any diagram based on the input template.    </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>Unchecked—All the parameter values currently specified for the added layout algorithm will be loaded by default when the algorithm is to be run on any diagram based on the input template.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定在基于指定模板生成逻辑示意图时是否自动执行布局算法。
        ///   <bulletList>
        /// <bullet_item>选中 - 添加的布局算法将在生成基于输入逻辑示意图模板参数的任何逻辑示意图期间自动运行。这是默认设置。
        ///       <para>为布局算法指定的参数值用于在逻辑示意图生成期间运行布局。默认情况下，当算法要在基于输入模板的任何逻辑示意图上运行时，也会加载它们。   </para>
        ///     </bullet_item><para/>
        ///     <bullet_item>未选中—默认情况下，当要在基于输入模板的任何逻辑示意图上运行该算法时，将加载当前为添加的布局算法指定的所有参数值。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Active")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public _is_active_value _is_active { get; set; }

        public enum _is_active_value
        {
            /// <summary>
            /// <para>ACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ACTIVE")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>INACTIVE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("INACTIVE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Preserve container layout</para>
        /// <para><xdoc>
        ///   <para>Specifies how the algorithm will process containers.
        ///   <bulletList>
        ///     <bullet_item>Checked—The layout algorithm will execute on the top graph of the diagram so containers are preserved.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—The layout algorithm will execute on both content and noncontent features in the diagram. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定算法将如何处理容器。
        ///   <bulletList>
        ///     <bullet_item>选中 - 布局算法将在逻辑示意图的顶部图形上执行，以便保留容器。</bullet_item><para/>
        ///     <bullet_item>未选中 - 布局算法将对逻辑示意图中的内容要素和非内容要素执行。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Preserve container layout")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _are_containers_preserved_value _are_containers_preserved { get; set; } = _are_containers_preserved_value._false;

        public enum _are_containers_preserved_value
        {
            /// <summary>
            /// <para>PRESERVE_CONTAINERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PRESERVE_CONTAINERS")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>IGNORE_CONTAINERS</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("IGNORE_CONTAINERS")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Reshape Operation</para>
        /// <para><xdoc>
        ///   <para>Specifies how edges will be reshaped.</para>
        ///   <bulletList>
        ///     <bullet_item>Remove vertices—Vertices along any edges in the diagram will be removed.</bullet_item><para/>
        ///     <bullet_item>Square edges—Vertices will be placed along diagram edges, and the edges will be displayed with right angles. This is the default.</bullet_item><para/>
        ///     <bullet_item>Separate overlapping edges—Edges that connect the same origin and extremity junctions will be separated when they are overlapping.</bullet_item><para/>
        ///     <bullet_item>Reduce vertices by angle—Some or all vertices displayed along diagram edges will be reduced according to the angle that separates the segments incident to those vertices.</bullet_item><para/>
        ///     <bullet_item>Mark crossing edges—The horizontal and vertical diagram edges that cross each other at a right angle in the diagram will be marked, and the geometry of one of the crossing edges will be reshaped to display a circular arc at this location.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定如何调整边的形状。</para>
        ///   <bulletList>
        ///     <bullet_item>移除折点—将移除沿逻辑示意图中任何边的折点。</bullet_item><para/>
        ///     <bullet_item>方形边—折点将沿逻辑示意图边放置，并且边将以直角显示。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>单独的重叠边 - 连接同一原点和末端交汇点的边在重叠时将被分隔。</bullet_item><para/>
        ///     <bullet_item>按角度缩小折点—沿逻辑示意图边显示的部分或全部折点将根据分隔入射入这些折点的线段的角度进行折小。</bullet_item><para/>
        ///     <bullet_item>标记交叉边—将标记逻辑示意图中以直角相互交叉的水平逻辑示意图边和垂直逻辑示意图边，并且将调整其中一个交叉边的几何形状，以在此位置显示圆弧。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Reshape Operation")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _reshape_type_value _reshape_type { get; set; } = _reshape_type_value._SQUARE_EDGES;

        public enum _reshape_type_value
        {
            /// <summary>
            /// <para>Remove vertices</para>
            /// <para>Remove vertices—Vertices along any edges in the diagram will be removed.</para>
            /// <para>移除折点—将移除沿逻辑示意图中任何边的折点。</para>
            /// </summary>
            [Description("Remove vertices")]
            [GPEnumValue("REMOVE_VERTICES")]
            _REMOVE_VERTICES,

            /// <summary>
            /// <para>Square edges</para>
            /// <para>Square edges—Vertices will be placed along diagram edges, and the edges will be displayed with right angles. This is the default.</para>
            /// <para>方形边—折点将沿逻辑示意图边放置，并且边将以直角显示。这是默认设置。</para>
            /// </summary>
            [Description("Square edges")]
            [GPEnumValue("SQUARE_EDGES")]
            _SQUARE_EDGES,

            /// <summary>
            /// <para>Separate overlapping edges</para>
            /// <para>Separate overlapping edges—Edges that connect the same origin and extremity junctions will be separated when they are overlapping.</para>
            /// <para>单独的重叠边 - 连接同一原点和末端交汇点的边在重叠时将被分隔。</para>
            /// </summary>
            [Description("Separate overlapping edges")]
            [GPEnumValue("SEPARATE_OVERLAPPING_EDGES")]
            _SEPARATE_OVERLAPPING_EDGES,

            /// <summary>
            /// <para>Reduce vertices by angle</para>
            /// <para>Reduce vertices by angle—Some or all vertices displayed along diagram edges will be reduced according to the angle that separates the segments incident to those vertices.</para>
            /// <para>按角度缩小折点—沿逻辑示意图边显示的部分或全部折点将根据分隔入射入这些折点的线段的角度进行折小。</para>
            /// </summary>
            [Description("Reduce vertices by angle")]
            [GPEnumValue("REDUCE_VERTICES_BY_ANGLE")]
            _REDUCE_VERTICES_BY_ANGLE,

            /// <summary>
            /// <para>Mark crossing edges</para>
            /// <para>Mark crossing edges—The horizontal and vertical diagram edges that cross each other at a right angle in the diagram will be marked, and the geometry of one of the crossing edges will be reshaped to display a circular arc at this location.</para>
            /// <para>标记交叉边—将标记逻辑示意图中以直角相互交叉的水平逻辑示意图边和垂直逻辑示意图边，并且将调整其中一个交叉边的几何形状，以在此位置显示圆弧。</para>
            /// </summary>
            [Description("Mark crossing edges")]
            [GPEnumValue("MARK_CROSSING_EDGES")]
            _MARK_CROSSING_EDGES,

        }

        /// <summary>
        /// <para>Preserve path</para>
        /// <para><xdoc>
        ///   <para>Specifies whether vertices along the edges that are going to be squared will be preserved. This parameter can only be used when Reshape Operation is Square edges.
        ///   <bulletList>
        ///     <bullet_item>Checked—The direction of any edge will be considered, and vertices along that edge will be preserved from the first vertex to the last. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Vertices along the diagram edges will not be considered, and the vertices will be removed during execution.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否保留沿边的平方顶点。仅当“整形操作”为“方形边”时，才能使用此参数。
        ///   <bulletList>
        ///     <bullet_item>选中 - 将考虑任何边的方向，并且沿该边的折点将保留从第一个折点到最后一个折点。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>未选中 - 将不考虑沿逻辑示意图边的折点，并且在执行过程中将移除折点。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Preserve path")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _is_path_preserved_value _is_path_preserved { get; set; } = _is_path_preserved_value._true;

        public enum _is_path_preserved_value
        {
            /// <summary>
            /// <para>PRESERVE_PATH</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("PRESERVE_PATH")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>IGNORE_PATH</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("IGNORE_PATH")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Offset Between Edges</para>
        /// <para>The spacing that will separate parallel segments of squared edges incident to the same junction. The default is 5 in the units of the diagram's coordinate system. This parameter can only be used when Reshape Operation is Square edges.</para>
        /// <para>将方边的平行段分开入射到同一交汇点的间距。默认值为 5，以逻辑示意图坐标系为单位。仅当“整形操作”为“方形边”时，才能使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Offset Between Edges")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _offset_between_segment_absolute { get; set; } = "5 Unknown";


        /// <summary>
        /// <para>Break Point Position</para>
        /// <para>The maximum distance between each junction to the first or last break point along edges incident to that junction when those edges are squared. The default is 8.66 in the units of the diagram's coordinate system. This parameter can only be used when Reshape Operation is Square edges.</para>
        /// <para>当这些边为平方时，每个交汇点与入射到该交汇点的边之间的最大距离。默认值为 8.66，以逻辑示意图坐标系为单位。仅当“整形操作”为“方形边”时，才能使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Break Point Position")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _breakpoint_absolute { get; set; } = "8.66 Unknown";


        /// <summary>
        /// <para>Offset Between Edges</para>
        /// <para>The absolute spacing that will separate two edges. The default is 0.5 in the units of the diagram's coordinate system. This parameter can only be used when Reshape Operation is Separate overlapping edges.</para>
        /// <para>将分隔两条边的绝对间距。默认值为 0.5，以逻辑示意图坐标系为单位。仅当“整形操作”（Reshape Operation） 为“分隔重叠边”（Separate overlapping edge） 时，才能使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Offset Between Edges")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _shift_between_edge_absolute { get; set; } = "0.5 Unknown";


        /// <summary>
        /// <para>Angle Threshold</para>
        /// <para>The angle formed by the incident segments over which the vertex related to these segments is reduced. The wider the angle, the fewer number of vertices will be reduced. The default is 160 degrees. This parameter can only be used when Reshape Operation is Reduce vertices by angle.</para>
        /// <para>由入射线段形成的角度，与这些线段相关的顶点在其上减小。角度越宽，减少的顶点数量就越少。默认值为 160 度。仅当“重塑操作”（Reshape Operation） 为“按角度减少顶点”（Reduce vertices by angle） 时，才能使用此参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Angle Threshold")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public double _angle_threshold { get; set; } = 0;


        /// <summary>
        /// <para>Output Network</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Network")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_utility_network { get; set; }


        /// <summary>
        /// <para>Output Diagram Template</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Diagram Template")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_template_name { get; set; }


        /// <summary>
        /// <para>Circular Arc Radius</para>
        /// <para>The radius of the circular arc that will be added to the crossing edge locations. The default is 5.</para>
        /// <para>将添加到交叉边位置的圆弧半径。默认值为 5。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Circular Arc Radius")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string _circular_arc_radius { get; set; } = "5 Unknown";


        /// <summary>
        /// <para>Circular Arc Position</para>
        /// <para><xdoc>
        ///   <para>Specifies the segment on which a circular arc will be placed.</para>
        ///   <bulletList>
        ///     <bullet_item>Left of vertical segment—A circular arc will be placed to the left of the vertical segment.</bullet_item><para/>
        ///     <bullet_item>Right of vertical segment—A circular arc will be placed to the right of the vertical segment.</bullet_item><para/>
        ///     <bullet_item>Above horizontal segment—A circular arc will be placed above the horizontal segment.</bullet_item><para/>
        ///     <bullet_item>Below horizontal segment—A circular arc will be placed below the horizontal segment.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定将放置圆弧的线段。</para>
        ///   <bulletList>
        ///     <bullet_item>垂直线段左侧 - 垂直线段的左侧将放置一个圆弧。</bullet_item><para/>
        ///     <bullet_item>垂直线段的右侧 - 垂直线段的右侧将放置一个圆弧。</bullet_item><para/>
        ///     <bullet_item>水平线段上方 - 圆弧将放置在水平线段上方。</bullet_item><para/>
        ///     <bullet_item>水平线段下方 - 将放置水平线段下方的圆弧。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Circular Arc Position")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _circular_arc_position_value _circular_arc_position { get; set; } = _circular_arc_position_value._RIGHT_OF_VERTICAL_SEGMENT;

        public enum _circular_arc_position_value
        {
            /// <summary>
            /// <para>Left of vertical segment</para>
            /// <para>Left of vertical segment—A circular arc will be placed to the left of the vertical segment.</para>
            /// <para>垂直线段左侧 - 垂直线段的左侧将放置一个圆弧。</para>
            /// </summary>
            [Description("Left of vertical segment")]
            [GPEnumValue("LEFT_OF_VERTICAL_SEGMENT")]
            _LEFT_OF_VERTICAL_SEGMENT,

            /// <summary>
            /// <para>Right of vertical segment</para>
            /// <para>Right of vertical segment—A circular arc will be placed to the right of the vertical segment.</para>
            /// <para>垂直线段的右侧 - 垂直线段的右侧将放置一个圆弧。</para>
            /// </summary>
            [Description("Right of vertical segment")]
            [GPEnumValue("RIGHT_OF_VERTICAL_SEGMENT")]
            _RIGHT_OF_VERTICAL_SEGMENT,

            /// <summary>
            /// <para>Above horizontal segment</para>
            /// <para>Above horizontal segment—A circular arc will be placed above the horizontal segment.</para>
            /// <para>水平线段上方 - 圆弧将放置在水平线段上方。</para>
            /// </summary>
            [Description("Above horizontal segment")]
            [GPEnumValue("ABOVE_HORIZONTAL_SEGMENT")]
            _ABOVE_HORIZONTAL_SEGMENT,

            /// <summary>
            /// <para>Below horizontal segment</para>
            /// <para>Below horizontal segment—A circular arc will be placed below the horizontal segment.</para>
            /// <para>水平线段下方 - 将放置水平线段下方的圆弧。</para>
            /// </summary>
            [Description("Below horizontal segment")]
            [GPEnumValue("BELOW_HORIZONTAL_SEGMENT")]
            _BELOW_HORIZONTAL_SEGMENT,

        }

        public AddReshapeDiagramEdgesLayout SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}